package com.pcitc.app.model;

import com.pcitc.app.model.BaseObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.io.Serializable;

@Entity
@Table(name="TBL_PIPE",schema="XZGD")
public class TblPipe extends BaseObject implements Serializable {
    private Long pipeid;
    private String pipename;

    @Id  @GeneratedValue(strategy = GenerationType.AUTO)    
    public Long getPipeid() {
        return this.pipeid;
    }
    
    public void setPipeid(Long pipeid) {
        this.pipeid = pipeid;
    }
    
    @Column(name="PIPENAME", length=256)
    public String getPipename() {
        return this.pipename;
    }
    
    public void setPipename(String pipename) {
        this.pipename = pipename;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TblPipe pojo = (TblPipe) o;

        if (pipename != null ? !pipename.equals(pojo.pipename) : pojo.pipename != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = (pipename != null ? pipename.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("pipeid").append("='").append(getPipeid()).append("', ");
        sb.append("pipename").append("='").append(getPipename()).append("'");
        sb.append("]");
      
        return sb.toString();
    }

}
